<template>
<div id="mycomponent">
  <runoob></runoob>
<!--  插槽方式，父级模板传给子模板数据-->
  <slot name="header"> no header</slot>
  <slot name="foot">no foot</slot>
</div>

</template>

<script>
  //局部组件
  var Child = {
    template: '<h1>自定义局部组件!</h1>'
  }
    export default {
      name: "mycomponent",
      components: {
        // <runoob> 将只在父模板可用
        'runoob': Child
      }
    }
</script>
